﻿#include "servicecenter.h"
#include <QGlobalConfig>

#include <QCoreApplication>
#include <QDebug>
#include <filecontroller.h>
#include <httpservice.h>


ServiceCenter::ServiceCenter(QObject *parent) : QObject(parent)
{
    qDebug() << __FUNCTION__;
    QGlobalConfig::getInstance().init(QCoreApplication::applicationDirPath() + "/" + QCoreApplication::applicationName() + ".ini");
    HttpService::getInstance();
    HttpService::getInstance().installController("file", new FileController(this));
}

ServiceCenter::~ServiceCenter()
{
    QGlobalConfig::deleteInstance();
    qDebug() << __FUNCTION__;
}
